Fix: Focus bug on text control inside the block settings sidebar (trunk) #21027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #20950
The base branch of this PR is trunk because the issue does not exist in master anymore.
But this issue is preset on WordPress 5.4 RC3 and is a regression when compared with 5.3.2.
The regression happened on: #18915
It was fixed on (not part of 5.4): #19701
Unfortunately, we can not add #19701 as part of 5.4 so this PR proposes a temporary solution we can use.
cc: @ellatrix in case you know another way to fix the issue.
How has this been tested?
I added a paragraph.
I went to the advanced panel on block inspector
I typed a classname.
I selected the text on the classname field and I verified the text did not get unselected and the focus removed from the field as soon as I released the mouse.
I verified selection and multi-selection still works as expected.